Detection apparatuses have been known that detect partial series similar to designated search patterns from parameter series such as base sequences of deoxyribonucleic acids (DNAs), amino acid sequences of proteins, character strings, sequences of acoustic parameters representing voices, and music data sequences. In an example of such detection apparatuses, a similarity is calculated between a partial series in a parameter series and a search pattern, and it is determined that the partial series is similar to the search pattern when the calculated similarity exceeds a preliminarily set threshold. The similarity between the partial series and the search pattern is represented by an accumulative score obtained by accumulating all of the local scores, each of which is calculated for each of the parameters included in the partial series and represents a likelihood of the parameter in the search pattern, for example.
When a hidden Markov model is used for the search pattern, the number of parameters included in the partial series varies depending on paths in the search pattern. As a result, as the number of parameters included in the partial series becomes larger, an absolute value of the accumulative score tends to become larger. When it is unfavorable that the accumulative score varies depending on the number of parameters included in the partial series, the similarity between the partial series and the search pattern may be represented by an average score obtained by normalizing the accumulative value by the number of parameters included in the partial series. It is, however, difficult to calculate such an average score with high accuracy by simple calculation.